﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TLD_Vision.filters
{
    public class Filters
    {
        public static SinglePixelOperation ApplyThreshold(int threshold)
        {
            return delegate(uint argb)
            {
                unsafe
                {
                    byte* bgra = (byte*)&argb;
                    if (bgra[0] > threshold)
                    {
                        return (uint)0xFFFFFFFF;
                    }
                    else
                    {
                        return (uint)0xFF000000;
                    }
                }
            };
        }
    }
}
